﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>创建JavaScript对象</title>
</head>
<body>
    <script>
        function person(firstName, lastName, age, eyeColor) {
            this.firstName = firstName;
            this.lastName = lastName;
            this.age = age;
            this.eyecolor = eyeColor;
        }
        mySon = new person("liu", "hao", 3, "black");
        document.write(person.firstname + person.lastname + "现在" + person.age + "岁了");
    </script>
</body>
</html>